package com.dyh.lvup.byteBuddy;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.logging.Logger;

/*
@Author=Joey Wheeler
@Date=2021/3/1 16:44
*/
public class Utils {


    public static void output(String fileName,byte[] bytes) {
        FileOutputStream out = null;
        try {
            String pathName = "D:\\work\\dyh\\lvup\\lvup-byteBuddy\\src\\main\\resources\\" + fileName+".class";
            out = new FileOutputStream(new File(pathName));
//            System.out.println("类输出路径：" + pathName);
            out.write(bytes);
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (null != out) try {
                out.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }

}
